<%--
  Created by IntelliJ IDEA.
  User: Wdd
  Date: 2019/12/2
  Time: 18:35
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
  <head>
    <title>首页</title>
  </head>
  ${msg}
  <body>
  <table align="center">
    <tr align="center">
      <td colspan="5"><a href="add.jsp"><button>添加商品</button></a></td>
      <td><a href="login.jsp"><button>退出</button></a></td>
    </tr>
    <tr align="center">
      <td>序号</td>
      <td>名称</td>
      <td>品类</td>
      <td>品牌</td>
      <td>价格</td>
      <td>操作</td>
    </tr>

    <c:forEach items="${list}" var="good" varStatus="gs">
      <tr align="cnenter">
        <td>${gs.count}</td>
        <td>${good.name}</td>
        <td>${good.type}</td>
        <td>${good.brand}</td>
        <td>${good.price}</td>
        <td>
          <a href="toupdate.action?id=${good.id}"><button>修改</button></a>
          <a href="delete.action?id=${good.id}"><button>删除</button></a>
        </td>
      </tr>
    </c:forEach>

  </table>
  </body>
</html>
